<template>
    <div>
        <h3>This is App</h3>
        <!--因为render会清空#app标签下的所有内容，所以router要放到render的页面里，不能放到app里-->
        <router-link to="/user">User</router-link>
        <router-link to="/goods">Goods</router-link>
        <!--router-view最终会展示链接点击内容，负责路由链接的渲染-->
        <router-view></router-view>
    </div>
</template>

<script>
    export default {
        name: "App"
    }
</script>

<style scoped lang="scss">
    body {
        display: flex;
        position: relative;
        div {
            width: 300px;
            height: 300px;
            margin: auto 200px;
            background-color: antiquewhite;
            border: 1px solid blue;
            position: absolute;
            padding: 20px 20px;
        }
    }
</style>
